﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MasterPagePrivate.master" AutoEventWireup="true" CodeFile="ProjectChange.aspx.cs" Inherits="Pages_Private_ProjectChange" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageHeader" Runat="Server">
    <script language="javascript" type="text/javascript">       
        var _ProjectID = <%= _ProjectID.ToString()%>;
        var _ApartmentPropertyTypeID = <%= ConfigReader.ApartmentPropertyTypeID %>;
        var _LandPropertyTypeID = <%= ConfigReader.LandPropertyTypeID %>
        var _SelectedUnitName = '<%=_UnitName %>';

        function ApartmentRequiredValidation(sender, args) {
            if ($('#<%=ddlPropertyTypes.ClientID %>').val() == _ApartmentPropertyTypeID) {
                if(args.Value.length > 0)
                    args.IsValid = true;
                else
                    args.IsValid = false;
            }
        }
        function LandRequiredValidation(sender, args) {
            if ($('#<%=ddlPropertyTypes.ClientID %>').val() == _LandPropertyTypeID) {
                if(args.Value.length > 0)
                    args.IsValid = true;
                else
                    args.IsValid = false;
            }
        }       
        function GetUnitName(ddlPropertyTypes)
        {
            var propertyTypeID = $(ddlPropertyTypes).val().length > 0 ? parseInt($(ddlPropertyTypes).val()) : 0;            
            if(propertyTypeID == 0)
                _SelectedUnitName = '';
            else
            {
                ShowProgressAnimation($(ddlPropertyTypes).attr('id'), $(ddlPropertyTypes).width() + 5, 0);
                AjaxService.GetUnitNameForPropertyType(propertyTypeID, GetUnitName_Success, OnAjax_Error, OnAjax_TimeOut);
            }
        }
        function GetUnitName_Success(result)
        {
            HideProgressAnimation();
            _SelectedUnitName = result;
            //alert(_SelectedUnitName);
        }
        function btnNextStep1_Click() {
            $('.unitText').html(_SelectedUnitName);
            if ($('#<%=ddlPropertyTypes.ClientID %>').val() == _LandPropertyTypeID)
                $('#tbdApartment, #tbdStreeHouseAddress').hide();
            else
                $('#tbdApartment, #tbdStreeHouseAddress').show();

            MoveToStep(2, 6, 'Step1');
            $(document).scrollTop();
        }
        function btnNextStep2_Click() {
            MoveToStep(3, 6, 'Step2');
        }
        function btnNextStep3_Click()
        {
            MoveToStep(4, 6, 'Step3');
        }
        function GetSelectedContactPersons()
        {
            var str = '';
           $("#<%=divContactPersonList.ClientID %> input[type='checkbox']:checked").each(function(){
            if(str.length == 0)
                str = $(this).val();
            else
                str += ',' + $(this).val();
           });
           return str;
        }
        var _Project = null; 
        function PrepareProjectObject()
        {
            _Project = new App.CustomEntity.Project();
            _Project.ID = _ProjectID;
            _Project.PropertyTypeID =  $('#<%=ddlPropertyTypes.ClientID %>').val();
		    _Project.ProjectStatusID = $('#<%=ddlProjectStatusID.ClientID %>').val();
		    _Project.Name = $('#<%=txtName.ClientID %>').val();
		    _Project.Description = $('#<%=txtDescription.ClientID %>').val();
		    _Project.ZoneID = $('#<%=ddlZoneID.ClientID %>').val();
		    _Project.StreetAddress = $('#<%=txtStreetAddress.ClientID %>').val();
		    _Project.HouseNo = $('#<%=txtHouseNo.ClientID %>').val();
		    _Project.AddressHint = $('#<%=txtAddressHint.ClientID %>').val();
            if(_Project.AddressHint.length == 0)
                _Project.AddressHint = 'NA';
            if ($('#<%=ddlPropertyTypes.ClientID %>').val() != _LandPropertyTypeID)
            {
                if($('#<%=txtNoOfUnits.ClientID %>').val().length > 0)
                    _Project.NoOfUnits = $('#<%=txtNoOfUnits.ClientID %>').val();
		        if($('#<%=txtNoOfFloors.ClientID %>').val().length > 0)
                    _Project.NoOfFloors = $('#<%=txtNoOfFloors.ClientID %>').val();   
                if($('#<%=txtAvailableUnits.ClientID %>').val().length > 0)
                    _Project.AvailableUnits = $('#<%=txtAvailableUnits.ClientID %>').val();
                if($('#<%=txtNoOfBeds.ClientID %>').val().length > 0)
                    _Project.NoOfBeds = $('#<%=txtNoOfBeds.ClientID %>').val();
		        _Project.HasParking = $('#<%=chkHasParking.ClientID %>').is(':checked');
		        _Project.HasGenerator = $('#<%=chkHasGenerator.ClientID %>').is(':checked');
		        _Project.HasLift = $('#<%=chkHasLift.ClientID %>').is(':checked');
		        _Project.HasSecurity = $('#<%=chkHasSecurity.ClientID%>').is(':checked');
            }	    
		    _Project.Area = $('#<%=txtArea.ClientID %>').val();
            if($('#<%=txtAreaTo.ClientID %>').val().length > 0)
                _Project.AreaTo = $('#<%=txtAreaTo.ClientID %>').val();
            _Project.AreaOther = $('#<%=txtAreaOther.ClientID %>').val();
		    _Project.PricePerUnitFrom = $('#<%=txtPricePerUnitFrom.ClientID %>').val();
		    _Project.PricePerUnitTo = $('#<%=txtPricePerUnitTo.ClientID %>').val();
		    _Project.HasBookingAvailable = $('#<%=chkHasBookingAvailable.ClientID%>').is(':checked');
		    _Project.BookingFee = $('#<%=txtBookingFee.ClientID %>').val();
            _Project.ContactPersons = GetSelectedContactPersons();
            _Project.ShowPricingInfo = $('#<%=chkShowPricingInfo.ClientID%>').is(':checked');
            _Project.PackageSubscriptionID = <%=_SubscriptionID.ToString() %>;
        }
        var _FinishButton = null;
        function SaveProjectInfo(btnElement)
        {
            if(Page_ClientValidate('Step4')) {
                //alert('I am here');
                ShowProgressAnimation($(btnElement).attr('id'), $(btnElement).width() + 5, 0);                
                $(btnElement).attr('disabled', true);
                _FinishButton = btnElement;
                PrepareProjectObject();
                PageMethods.SaveProject(_Project, SaveProject_Success, OnAjax_Error, OnAjax_TimeOut);
            }
        }
        function SaveProject_Success(result)
        {
            HideProgressAnimation();            
            var newProjectID = result;
            if(newProjectID > 0)
            {
                var html = 'Your Project information has been saved successfully and sent for Administrator\'s Approval. <br /><a href="/Pages/Private/ProjectChange.aspx?ID=' + newProjectID + '">Click Here</a> to Edit this project';
                if(_ProjectID > 0)
                    html = 'Your Project information has been saved successfully. <br /><a href="/Pages/Private/ProjectChange.aspx?ID=' + newProjectID + '">Click Here</a> to Edit this project';
                
                $('#divFinalStepSummary').html(html);
                MoveToStep(5, 5, '');
                $(_FinishButton).attr('disabled', false);
                //alert('New Project ID Is: ' + newProjectID);
            }
            else
            {
                ///Handle Session Timeout Code here
                window.location = '/Pages/Private/ProjectList.aspx?Rnd=' + GetRandomNumber() ;
            }
        }
        function ValidateContactSelection(sender, args)
        {
            if($("#<%=divContactPersonList.ClientID %> input[type='checkbox']:checked").length > 0)
                args.IsValid = true;
            else
                args.IsValid = false;
        }
        var _ImgElement = null;
        var _FileID = 0;
        function DeleteAttachment(fileId, imgElement)
        {        
            _ImgElement = imgElement;    
            _FileID = fileId;
            ShowProgressAnimation('btnNextStep1', $('#btnNextStep1').width() + 10, 0);
            if(fileId > 0)                            
                PageMethods.DeleteProjectAttachment(fileId, '', DeleteAttachment_Success, OnAjax_Error, OnAjax_TimeOut)            
            else
            {
                $(imgElement).parent().remove();
                var filePath = $(imgElement).parent().find('a').attr('href');                
                PageMethods.DeleteProjectAttachment(fileId, filePath, DeleteAttachment_Success, OnAjax_Error, OnAjax_TimeOut);
            }
        }
        function DeleteAttachment_Success(hasDeleted)
        {
            HideProgressAnimation();
            if(_FileID  > 0 && hasDeleted == true)
                $(_ImgElement).parent().remove();            
        }
        function AddAttachmentLink(fileName)
        {
            var element = '<li><a href="<%=AppConstants.TEMP_DIRECTORY %>/<%=SessionCache.CurrentUser.ID %>/' + fileName + '" target="_blank">' + fileName + '</a> <img onclick="DeleteAttachment(0, this)" src="/Images/delete.png" style="cursor:pointer;" alt="Delete" title="Delete"/></li>';
            $('#ulAttachedFiles li:last').after(element);
        }        
        $(document).ready(function () {
            $('#<%=ddlPropertyTypes.ClientID %>').change(function(){ GetUnitName($(this)); });
            var ddlCity = $('#<%=ddlCity.ClientID %>');
            $('#<%=ddlCountry.ClientID %>').change(function(){ GetCitiesByCountry($(this), ddlCity); });
            $(ddlCity).change(function () { BindZoneWithDropdownList($(this), $('#<%= ddlZoneID.ClientID %>')); });
        });
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" Runat="Server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <Services>
            <asp:ServiceReference Path="~/Services/AjaxService.asmx" />
        </Services> 
    </asp:ScriptManagerProxy>

    <h4 id="h4Heading" runat="server">Add New Project</h4>
    
    <div id="divMessage" class="ErrorMessageBox" runat="server" visible="false" style="display:block; margin-bottom:15px;"></div>
    
    <div class="clearboth"></div>
    
    <div id="divPackageSubscription" runat="server" visible="false">
        Not subscribed to a package/your subscription has expired.<%--You do not subscribed to a package or your subscription has expired.--%><br /> 
        Please <a href="<%= AppConstants.Pages.SUBSCRIBE_PACKAGE %>">click here</a> to subscribe to a package.
    </div>

    <asp:Panel ID="pnlFormContainer" runat="server">
        <%--First Step Start--%>        
        <div id="divStep_1" class="WizardContainer" style="display:block;">
            <div class="StepHeaderContainer">
                <div class="StepHeading">
                    <div class="floatleft"><asp:Label ID="lblMemberShipType" runat="server" Text="General Information"></asp:Label></div>
                    <div class="floatright">Step 1 of 4</div>
                    <div class="clearboth"></div>
                </div>
                <div class="StepSubHeading"><asp:Label ID="Label1" runat="server" Text="Define Your Project Type, Status and Name, Description"></asp:Label></div>
            </div>
            <div class="StepBody">
                <table cellpadding="3" cellspacing="0" style="width:70%;">
                    <colgroup>
                        <col style="width:27%;" />
                        <col />
                    </colgroup>
                    <tr>
                        <td><asp:Label ID="lblProjectType" runat="server" Text="Project Type"></asp:Label><span class="requiredMark">*</span></td>
                        <td>
                            <asp:DropDownList ID="ddlPropertyTypes" runat="server"></asp:DropDownList>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
							    ControlToValidate="ddlPropertyTypes" SetFocusOnError="true"
							    ErrorMessage="Please Select a Property Type." Display="Dynamic"
							    ValidationGroup="Step1">
						    </asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
					    <td><asp:Label ID="lblProjectStatus" runat="server" Text="Project Status"></asp:Label><span class="requiredMark">*</span></td>
					    <td>
						    <asp:DropDownList ID="ddlProjectStatusID" runat="server"></asp:DropDownList>
						    <asp:RequiredFieldValidator ID="rfvProjectStatusID" runat="server"
							    ControlToValidate="ddlProjectStatusID" SetFocusOnError="true"
							    ErrorMessage="Please Select a Project Status." Display="Dynamic"
							    ValidationGroup="Step1">
						    </asp:RequiredFieldValidator>
					    </td>
				    </tr>
				    <tr>
					    <td>Name of the project<span class="requiredMark">*</span></td>
					    <td>
						    <asp:TextBox ID="txtName" MaxLength="150" runat="server"></asp:TextBox>
						    <asp:RequiredFieldValidator ID="rfvName" runat="server"
							    ControlToValidate="txtName" SetFocusOnError="true"
							    ErrorMessage="Please Enter a Name." Display="Dynamic"
							    ValidationGroup="Step1">
						    </asp:RequiredFieldValidator>
					    </td>
				    </tr>
                    <tr>
					    <td>Describe your project<span class="requiredMark">*</span></td>
					    <td>
						    <asp:TextBox ID="txtDescription" TextMode="MultiLine" MaxLength="2000" runat="server"></asp:TextBox>
						    <asp:RequiredFieldValidator ID="rfvDescription" runat="server"
							    ControlToValidate="txtName" SetFocusOnError="true"
							    ErrorMessage="Please Enter Description." Display="Dynamic"
							    ValidationGroup="Step1">
						    </asp:RequiredFieldValidator>
					    </td>
				    </tr>
                    <tr>
                        <td>Project Pictures and Brochure</td>
                        <td>
                            <div>
                                <ul id="ulAttachedFiles">
                                    <li style="display:none;">&nbsp;</li>
						            <asp:Literal ID="ltrAttachmentList" runat="server" Text=""></asp:Literal>                  
				                </ul>
                            </div>
                            <div>				
                                <a href="javascript:void(0);" onclick="ShowCenteredPopUp('ProjectFileAttachment.aspx?ID=<%=_ProjectID %>', 'ProjectAttachment', 500, 330, false);">Attach Picture, Brochure</a>
                            </div>                           
                        </td>
                    </tr>
                    <tr>
                        <td>Is Featured?</td>
                        <td><asp:Label ID="lblIsHot" runat="server" Visible="true"/></td>
                    </tr>
                    <tr>
                        <td>Is Approved?</td>
                        <td><asp:Label ID="lblIsApproved" runat="server" Visible="true"/></td>
                    </tr>
                </table>
            </div>
            <div class="StepButtonContainer">
                <input type="button" id="btnNextStep1" class="ButtonCommon" value="Next" onclick="btnNextStep1_Click();" />
            </div>
        </div>
        <%--First Step End--%>

        <%--Second Step Start--%>
        <div id="divStep_2" class="WizardContainer" style="display:none;">
            <div class="StepHeaderContainer">
                <div class="StepHeading">
                    <div class="floatleft"><asp:Label ID="Label2" runat="server" Text="Location"></asp:Label></div>
                    <div class="floatright">Step 2 of 4</div>
                    <div class="clearboth"></div>
                </div>
                <div class="StepSubHeading"><asp:Label ID="Label3" runat="server" Text="Define the Location of this Project"></asp:Label></div>
            </div>
            <div class="StepBody">
                <table cellpadding="3" cellspacing="0" style="width:70%;">
                    <colgroup>
                        <col style="width:27%;" />
                        <col />
                    </colgroup> 
                    <tbody>
                        <tr>
					        <td><asp:Label ID="lblCountry" runat="server" Text="Country"></asp:Label><span class="requiredMark">*</span></td>
					        <td>
						        <asp:DropDownList ID="ddlCountry" runat="server"></asp:DropDownList>
						        <asp:RequiredFieldValidator ID="rfvCountry" runat="server"
							        ControlToValidate="ddlCountry" SetFocusOnError="true"
							        ErrorMessage="Please Select a Country." Display="Dynamic"
							        ValidationGroup="Step2">
						        </asp:RequiredFieldValidator>
					        </td>
				        </tr>
                        <tr>
					        <td><asp:Label ID="lblCity" runat="server" Text="City"></asp:Label><span class="requiredMark">*</span></td>
					        <td>
						        <asp:DropDownList ID="ddlCity" runat="server"></asp:DropDownList>
						        <asp:RequiredFieldValidator ID="rfvCity" runat="server"
							        ControlToValidate="ddlCity" SetFocusOnError="true"
							        ErrorMessage="Please Select a City." Display="Dynamic"
							        ValidationGroup="Step2">
						        </asp:RequiredFieldValidator>
					        </td>
				        </tr>
                        <tr>
                            <td><asp:Label ID="lblPreferredArea" runat="server" Text="Area"></asp:Label><span class="requiredMark">*</span></td>
                            <td>
                                <asp:DropDownList ID="ddlZoneID" runat="server"></asp:DropDownList>
                                <asp:RequiredFieldValidator ID="rfvZoneID" runat="server"
                                    Display="Dynamic" SetFocusOnError="true"
                                    ControlToValidate="ddlZoneID" ValidationGroup="Step2"
                                    ErrorMessage="Please Select Zone.">
                                </asp:RequiredFieldValidator>
                                <%--<asp:CustomValidator ID="cvPreferredArea" runat="server"
                                    Display="Dynamic" SetFocusOnError="true" ClientValidationFunction="ValidatAreaSelection"
                                    ValidationGroup="Step2" ValidateEmptyText="true"
                                    ErrorMessage="Please Select Zones.">
                                </asp:CustomValidator>--%>
                            </td>
                        </tr>
                    </tbody>
                    <tbody id="tbdStreeHouseAddress">
				        <tr>
					        <td>Street Address</td>
					        <td>
						        <asp:TextBox ID="txtStreetAddress" MaxLength="250" runat="server"></asp:TextBox>						    
					        </td>
				        </tr>
                        <tr>
					        <td>House</td>
					        <td>
						        <asp:TextBox ID="txtHouseNo" MaxLength="50" runat="server"></asp:TextBox>						    
					        </td>
				        </tr>
                    </tbody>
                    <tbody>
                        <tr>
					        <td><asp:Label ID="lblAddressHint" runat="server" Text="Address Hint"></asp:Label></td>
					        <td>
						        <asp:TextBox ID="txtAddressHint" TextMode="MultiLine" MaxLength="500" runat="server"></asp:TextBox>
						        <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
							        ControlToValidate="txtAddressHint" SetFocusOnError="true"
							        ErrorMessage="Please Enter a Hint for this Address." Display="Dynamic"
							        ValidationGroup="Step2">
						        </asp:RequiredFieldValidator>--%>
					        </td>
				        </tr>
                    </tbody>
                </table>
            </div>
            <div class="StepButtonContainer">
                <input type="button" class="ButtonInActive" value="Back" onclick="MoveToStep(1, 6, '');" />
                <input type="button" class="ButtonCommon" value="Next" onclick="MoveToStep(3, 6, 'Step2');" />
            </div>
        </div>       
        <%--Second Step End--%>  
        
        <%--Third Step Start--%>        
        <div id="divStep_3" class="WizardContainer" style="display:none;">
            <div class="StepHeaderContainer">
                <div class="StepHeading">
                    <div class="floatleft"><asp:Label ID="Label4" runat="server" Text="Specification &amp; Pricing"></asp:Label></div>
                    <div class="floatright">Step 3 of 4</div>
                    <div class="clearboth"></div>
                </div>
                <div class="StepSubHeading"><asp:Label ID="Label5" runat="server" Text="Specify your project properties."></asp:Label></div>
            </div>
            <div class="StepBody">
                <div class="GroupBox">
                    <div class="GroupHeaderOverlay">Specification</div>
                    <table cellpadding="3" cellspacing="0" style="width:70%;">
                        <colgroup>
                            <col style="width:27%;" />
                            <col />
                        </colgroup> 
                        <tbody>
                            <tr>
					            <td>Size From<span class="requiredMark">*</span></td>
					            <td>
						            <asp:TextBox ID="txtArea" MaxLength="9" runat="server" style="width:50%;"></asp:TextBox> &nbsp;<span class="unitText"></span>
						            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
							            ControlToValidate="txtArea" SetFocusOnError="true"
							            ErrorMessage="<br/>Please Enter Area." Display="Dynamic"
							            ValidationGroup="Step3">
						            </asp:RequiredFieldValidator>
                                    <asp:CompareValidator ID="rfvArea" runat="server"
							            ControlToValidate="txtArea" SetFocusOnError="true"
                                        Operator="DataTypeCheck" Type="Double"
							            ErrorMessage="<br/>Please Enter Area in Digits only." Display="Dynamic"
							            ValidationGroup="Step3">
						            </asp:CompareValidator>
					            </td>
				            </tr>
                            <tr>
					            <td>Size To</td>
					            <td>
						            <asp:TextBox ID="txtAreaTo" MaxLength="9" runat="server" style="width:50%;"></asp:TextBox> &nbsp;<span class="unitText"></span>						            
                                    <asp:CompareValidator ID="CompareValidator4" runat="server"
							            ControlToValidate="txtAreaTo" SetFocusOnError="true"
                                        Operator="DataTypeCheck" Type="Double"
							            ErrorMessage="<br/>Please Enter Area in Digits only." Display="Dynamic"
							            ValidationGroup="Step3">
						            </asp:CompareValidator>
					            </td>
				            </tr>
                            <tr>
					            <td>Other Aavailable Sizes</td>
					            <td>
						            <asp:TextBox ID="txtAreaOther" MaxLength="50" runat="server" style="width:50%;"></asp:TextBox> &nbsp;<span class="unitText"></span>
					            </td>
				            </tr>
                        </tbody>
                        
                        <tbody id="tbdApartment">
                            <tr>
					            <td>Number Of Units<%--<span class="requiredMark">*</span>--%></td>
					            <td>
						            <asp:TextBox ID="txtNoOfUnits" MaxLength="4" runat="server"></asp:TextBox>
						            <%--<asp:CustomValidator ID="rfvNoOfUnits" runat="server"
							            ControlToValidate="txtNoOfUnits" SetFocusOnError="true"
							            ErrorMessage="Please Enter a No Of Units." Display="Dynamic"
							            ValidationGroup="Step3">
						            </asp:CustomValidator>--%>
                                    <asp:CompareValidator ID="CompareValidator5" runat="server"
							            ControlToValidate="txtNoOfUnits" SetFocusOnError="true"
                                        Operator="DataTypeCheck" Type="Integer"
							            ErrorMessage="<br/>Please Enter Number of Units in Digits only." Display="Dynamic"
							            ValidationGroup="Step3">
						            </asp:CompareValidator>
					            </td>
				            </tr>
				            <tr>
					            <td>Number Of Floors<%--<span class="requiredMark">*</span>--%></td>
					            <td>
						            <asp:TextBox ID="txtNoOfFloors" MaxLength="4" runat="server"></asp:TextBox>
						            <%--<asp:CustomValidator ID="rfvNoOfFloors" runat="server"
							            ControlToValidate="txtNoOfFloors" SetFocusOnError="true"
							            ErrorMessage="Please Enter No Of Floors." Display="Dynamic"
							            ValidationGroup="SaveInfo">
						            </asp:CustomValidator>--%>
                                    <asp:CompareValidator ID="CompareValidator6" runat="server"
							            ControlToValidate="txtNoOfFloors" SetFocusOnError="true"
                                        Operator="DataTypeCheck" Type="Integer"
							            ErrorMessage="<br/>Please Enter Number of Floors in Digits only." Display="Dynamic"
							            ValidationGroup="Step3">
						            </asp:CompareValidator>
					            </td>
				            </tr>
				            <tr>
					            <td>Available Units<%--<span class="requiredMark">*</span>--%></td>
					            <td>
						            <asp:TextBox ID="txtAvailableUnits" MaxLength="4" runat="server"></asp:TextBox>
						            <asp:CompareValidator ID="CompareValidator7" runat="server"
							            ControlToValidate="txtAvailableUnits" SetFocusOnError="true"
                                        Operator="DataTypeCheck" Type="Integer"
							            ErrorMessage="<br/>Please Enter Available Units in Digits only." Display="Dynamic"
							            ValidationGroup="Step3">
						            </asp:CompareValidator>
					            </td>
				            </tr>
                            <tr>
					            <td>Number of Beds<%--<span class="requiredMark">*</span>--%></td>
					            <td>
						            <asp:TextBox ID="txtNoOfBeds" MaxLength="4" runat="server"></asp:TextBox>
						            <%--<asp:CustomValidator ID="RequiredFieldValidator3" runat="server"
							            ControlToValidate="txtNoOfBeds" SetFocusOnError="true"
                                        ClientValidationFunction="ApartmentRequiredValidation" ValidateEmptyText="true"
							            ErrorMessage="Number of Beds." Display="Dynamic"
							            ValidationGroup="SaveInfo">
						            </asp:CustomValidator>--%>
                                    <asp:CompareValidator ID="CompareValidator8" runat="server"
							            ControlToValidate="txtNoOfBeds" SetFocusOnError="true"
                                        Operator="DataTypeCheck" Type="Integer"
							            ErrorMessage="<br/>Please Enter Number of Beds in Digits only." Display="Dynamic"
							            ValidationGroup="Step3">
						            </asp:CompareValidator>
					            </td>
				            </tr>
                            <tr>
					            <td>Utilities</td>
					            <td>
						            <asp:CheckBox ID="chkHasParking" runat="server" Text="Has Parking"/><br />
                                    <asp:CheckBox ID="chkHasGenerator" runat="server" Text="Has Generator" /><br />
                                    <asp:CheckBox ID="chkHasLift" runat="server" Text="Has Lift"/><br />
                                    <asp:CheckBox ID="chkHasSecurity" runat="server" Text="Has Security"/><br />
					            </td>
				            </tr>
                        </tbody>
                    </table>
                </div>
                
                <div class="GroupBox">
                    <div class="GroupHeaderOverlay">Pricing</div>
                    <table cellpadding="3" cellspacing="0" style="width:70%;">
                        <colgroup>
                            <col style="width:27%;" />
                            <col />
                        </colgroup>
                        <tr>
					        <td>Price Per <span class="unitText"></span> From<span class="requiredMark">*</span></td>
					        <td>
						        <asp:TextBox ID="txtPricePerUnitFrom" MaxLength="9" runat="server"></asp:TextBox>
						        <asp:RequiredFieldValidator ID="rfvPricePerUnitFrom" runat="server"
							        ControlToValidate="txtPricePerUnitFrom" SetFocusOnError="true"
							        ErrorMessage="Please Enter a Price." Display="Dynamic"
							        ValidationGroup="Step3">
						        </asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="CompareValidator3" runat="server"
							        ControlToValidate="txtPricePerUnitFrom" SetFocusOnError="true"
                                    Operator="DataTypeCheck" Type="Double"
							        ErrorMessage="Please Enter Price Per Unit in Digits only." Display="Dynamic"
							        ValidationGroup="Step3">
						        </asp:CompareValidator>
					        </td>
				        </tr>
				        <tr>
					        <td>Price Per <span class="unitText"></span> To<span class="requiredMark">*</span></td>
					        <td>
						        <asp:TextBox ID="txtPricePerUnitTo" MaxLength="9" runat="server"></asp:TextBox>
						        <asp:RequiredFieldValidator ID="rfvPricePerUnitTo" runat="server"
							        ControlToValidate="txtPricePerUnitTo" SetFocusOnError="true"
							        ErrorMessage="Please Enter a Price." Display="Dynamic"
							        ValidationGroup="Step3">
						        </asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="CompareValidator2" runat="server"
							        ControlToValidate="txtPricePerUnitTo" SetFocusOnError="true"
                                    Operator="DataTypeCheck" Type="Double"
							        ErrorMessage="Please Enter Price Per Unit in Digits only." Display="Dynamic"
							        ValidationGroup="Step3">
						        </asp:CompareValidator>
					        </td>
				        </tr>
                        <tr>
					        <td>Booking Price</td>
					        <td>
						        <%--<asp:Label ID="lblCurrenctySysmbol" runat="server"></asp:Label>--%>
                                <asp:TextBox ID="txtBookingFee" MaxLength="9" runat="server"></asp:TextBox>						    
                                <%--<asp:CompareValidator ID="CompareValidator1" runat="server"
							        ControlToValidate="txtBookingFee" SetFocusOnError="true"
                                    Operator="DataTypeCheck" Type="Double"
							        ErrorMessage="Please Enter Booking Price in Digits only." Display="Dynamic"
							        ValidationGroup="Step3">
						        </asp:CompareValidator>--%>
                                <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                    ValidationExpression="\[0-9]+"
                                    ControlToValidate="txtBookingFee" Display="Dynamic" SetFocusOnError="true"
                                    ErrorMessage="Please enter a valid Booking Fee."
                                    ValidationGroup="Step3">
                                </asp:RegularExpressionValidator>--%>
                                <%--<input type="button" onclick="alert(Page_ClientValidate('Step3'))" value="Test" />--%>
					        </td>
				        </tr>
                        <tr>
					        <td>Is Booking Available?</td>
					        <td>
						        <asp:CheckBox ID="chkHasBookingAvailable" runat="server"/>
                            </td>
                        </tr>
                        <tr>
					        <td>Show Pricing?</td>
					        <td>
						        <asp:CheckBox ID="chkShowPricingInfo" runat="server"/>
                            </td>
                        </tr>                        
                    </table>
                </div>
            </div>
            <div class="StepButtonContainer">
                <input type="button" class="ButtonInActive" value="Back" onclick="MoveToStep(2, 6, '');" />
                <input type="button" class="ButtonCommon" value="Next" onclick="btnNextStep3_Click();" />
            </div>
        </div>
        <%--Third Step End--%>
        
        
        <%--Fourth Step Start--%>        
        <div id="divStep_4" class="WizardContainer" style="display:none;">
            <div class="StepHeaderContainer">
                <div class="StepHeading">
                    <div class="floatleft"><asp:Label ID="Label6" runat="server" Text="Contact Person"></asp:Label></div>
                    <div class="floatright">Step 4 of 4</div>
                    <div class="clearboth"></div>
                </div>
                <div class="StepSubHeading"><asp:Label ID="Label7" runat="server" Text="Define Contact Person for this Project."></asp:Label></div>
            </div>
            <div class="StepBody">
                <table cellpadding="3" cellspacing="0" style="width:70%;">
                    <colgroup>
                        <col style="width:27%;" />
                        <col />
                    </colgroup>
                    <tr>
                        <td><asp:Label ID="Label8" runat="server" Text="Contact Persons"></asp:Label></td>
                        <td>
                            <div id="divContactPersonList" runat="server" class="CheckBoxListContainer">
                                
                            </div>
                            <asp:CustomValidator ID="cvContactPersons" runat="server"
                                Display="Dynamic" ClientValidationFunction="ValidateContactSelection"
                                ValidateEmptyText="true" ValidationGroup="Step4"
                                ErrorMessage="Please Select few Contact Persons for this project.">
                            </asp:CustomValidator>
                        </td>
                    </tr>                   
                </table>
            </div>
            <div class="StepButtonContainer">
                <input type="button" class="ButtonInActive" value="Back" onclick="MoveToStep(3, 6, '');" />
                <input type="button" id="btnFinish" class="ButtonCommon" value="Finish" onclick="SaveProjectInfo(this);" />
            </div>
        </div>
        <%--First Step End--%>
        
        <%-- Fifth Step Summary Start --%>
        <div id="divStep_5" class="WizardContainer" style="display:none;">
            <div class="StepHeaderContainer">
                <div class="StepHeading"><asp:Label ID="Label9" runat="server" Text="Successful"></asp:Label></div>
                <div class="StepSubHeading"><asp:Label ID="Label10" runat="server" Text="Project Submission Status."></asp:Label></div>
            </div>
            <div class="StepBody">                                
                <div id="divFinalStepSummary">
                    
                </div>
            </div>
            <div class="StepButtonContainer" style="height:20px;">
                <%--<input type="button" class="ButtonInActive" value="Back" onclick="MoveToStep(4, 6, '');" />
                <input type="button" class="ButtonCommon" value="Next" onclick="MoveToStep(6, 6, 'Step4');" />--%>
            </div>
        </div>
        <%--Fifth Step Summary End--%>
                 
    </asp:Panel>
</asp:Content>

